QSequentialTaskTreeRunner Class

A sequential task tree execution controller. More...

Header: #include <qtasktreerunner.h>
Inherits: QAbstractTaskTreeRunner

Public Functions

void enqueue(const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDoneFlags callDone)

Detailed Description

Manages sequential task tree execution. Use the enqueue() method to schedule the execution of a given recipe. It's guaranteed that at most one task tree is executing at any given time.

Member Function Documentation

template <typename SetupHandler = QAbstractTaskTreeRunner::TreeSetupHandler, typename DoneHandler = QAbstractTaskTreeRunner::TreeDoneHandler> void QSequentialTaskTreeRunner::enqueue(const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDoneFlags callDone)

Schedules the recipe execution. If no task tree is executing, the runner starts a new task tree synchronously, otherwise the recipe is enqueued. When the currently executing task tree finished, the runner starts a new task tree with a dequeued recipe. Calls setupHandler when new task tree is about to be started. Calls doneHandler when the task tree is finished. The doneHandler is called according to the passed callDone.